#include <cstdio>
#include <vector>


void test()
{
	std::vector<bool>is_prime(101,true);
	std::vector<int>primes;

	is_prime[0] = is_prime[1] = false;

	for (int i = 2;i < 101;i++)
	{
		if (is_prime[i])
		{
			primes.push_back(i);
		}

		for (int j = 0;j < primes.size()&&i*primes[j]<=100;j++)
		{
			is_prime[i*primes[j]] = false;
			if (0 == i % primes[j])
			{
				break;
			}
		}
	}
	
	for (int k = 0;k < primes.size();k++)
	{
		printf("%d ",primes.at(k));
	}
}

int main()
{
	test();
	return 0;
}